import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';

import { TabsPage } from '../pages/tabs/tabs';
import { HomeModule} from '../pages/home/home.module';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { NativeServiceC} from "../providers/NativeServiceC";
import { GlobalData} from "../providers/GlobalData";
import { IonicStorageModule} from "@ionic/storage";
import { HttpService} from "../providers/HttpService";
import { HttpModule, JsonpModule} from "@angular/http";
import {ShoppingModule} from "../pages/shopping/shopping.module";
import {ClassifyModule} from "../pages/classify/classify.module";
import { Network } from '@ionic-native/network';
import {MainModule} from "../pages/main/main.module";

@NgModule({
  declarations: [
      MyApp,
      TabsPage,
  ],
  imports: [
      BrowserModule,
      HttpModule,
      JsonpModule,
      IonicModule.forRoot(MyApp,{
      mode:"ios", //android是"md", 同一为ios风格
      setBackButtonText:'',
      tabsHideOnSubPages:true
    }),
      IonicStorageModule.forRoot(),
      //自定义模块
      MainModule,
      HomeModule,
      ShoppingModule,
      ClassifyModule,
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    TabsPage
  ],
  providers: [
      StatusBar,
      SplashScreen,
      HttpService,
      NativeServiceC,
      GlobalData,
      Network,
    {provide: ErrorHandler, useClass: IonicErrorHandler}
  ]
})
export class AppModule {
}
